package com.yang.news.web.controller;

import com.yang.news.aspect.IPLog;
import com.yang.news.aspect.SlidingWindowRateLimit;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author Billyang
 * @date 2024/9/13 17:40
 */
@Controller
@Slf4j
public class IndexController {
    @GetMapping("/")
    @IPLog
    @SlidingWindowRateLimit(requests = 10,timeWindow = 60)
    public String index() {
        log.info("IndexController 进入了首页方法");
        return "index";
    }
}
